import axios from 'axios';

const api = axios.create({
    baseURL: 'https://elm.cangdu.org',
    timeout: 5000
})

api.interceptors.request.use(config => {

    return config
},err=>{
  return Promise.reject(err)
})

api.interceptors.response.use(res => {
    return Promise.resolve(res.data)
},err => {
    return Promise.reject(err)
})

export default api